home *** CD-ROM | disk | FTP | other *** search
- // ==================================================
- // CTouchMeDialog.h
- // Copyright (C) 1996 Mizutori Tetsuya, July 4 1996.
- // ==================================================
- // All documents are pretty-printed in Geneva 10-point font.
-
- #pragma once
-
- #include <LDialogBox.h>
- #include <LBroadcaster.h>
- #include <LDragAndDrop.h>
- #include <LCommander.h>
-
- #include "CTouchMePref.h"
-
-
- class LCommander;
-
-
- class CTouchMeDialog : public LDialogBox , public LBroadcaster, public LDragAndDrop {
-
- public:
- enum { class_ID = 'TmeD' };
-
- static CTouchMeDialog * CreateTouchMeDialogStream( LStream *inStream );
- CTouchMeDialog( LStream *inStream );
- ~CTouchMeDialog();
-
-
- virtual void FindCommandStatus( CommandT inCommand,
- Boolean &outEnabled, Boolean &outUsesMark,
- Char16 &outMark, Str255 outName );
-
- virtual void ListenToMessage( MessageT inMessage, void *ioParam );
-
- // Set and Get dialog status according to the 'CTouchMePref' instance data
- void GetGlobalFrameRect( Rect & outRect );
- void MoveDialog( CTouchMePref &inPref );
- void SetupDialog( CTouchMePref & inPref );
- void InspectDialog( CTouchMePref & outPref );
- void Indicator( const Boolean inStatus );
-
- protected:
-
- // for Dialog
- virtual void FinishCreateSelf();
- virtual void DrawSelf();
- virtual void AttemptClose();
-
- // for Drag and Drop
- virtual Boolean ItemIsAcceptable( DragReference inDragRef, ItemReference inItemRef );
- virtual void ReceiveDragItem( DragReference inDragRef,
- DragAttributes inDragAttrs, ItemReference inItemRef, Rect &inItemBounds );
- virtual void EnterDropArea( DragReference inDragRef, Boolean inDragHasLeftSender );
- virtual void LeaveDropArea( DragReference inDragRef );
- virtual void InsideDropArea( DragReference inDragRef);
- virtual void HiliteDropArea( DragReference inDragRef );
-
- private:
-
- // for Dialog
- void SetEdifFieldText( PaneIDT inPane, const Str255 inString );
- void GetEdifFieldText( PaneIDT inPane, Str255 outString );
- void SetEdifFieldDateTime( PaneIDT inPane, const unsigned long inDateTimeSeconds );
-
- // for Drag and Drop
- Boolean IsModifierKeyPressed( DragReference inDragRef );
- PaneIDT FindPaneByMouse( const Point inPoint );
- void HilitePane( const PaneIDT inPaneID );
- void HiliteRect( const Rect & inRect );
-
- Boolean mTEActive;
- Boolean mModifier;
- PaneIDT mHilitePaneID;
- PaneIDT mTargetID;
- LCommander * mTarget;
- };
-
- // end of definitions
-